﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ActivityLibrary;
using Activities;
using System.Activities;
namespace CrediSoftDemo.Controllers
{
    public class FlujoController : Controller
    {
        [HttpGet]
        public ActionResult Index()
        {
            ActivityController.StartActivity();
            return View();
        }
        [HttpPost]
        public string Index(string number)
        {
            if (number != null && number != "")
            {
                int guess = Convert.ToInt32(number);
                ActivityController.TryGuess(guess);
                return ActivityController.GetMessage();
            }
            else
                return "";
        }
    }
}  
